import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../views/Main.vue'),
      children:[
        {
          path: '/goodsList',
          name: 'goodsList',
          component: () => import('../views/GoodsListView.vue'),
        }
      ]
    }
  ]
})

export default router
